const mix = require('laravel-mix');
if (mix.inProduction()) {
    mix.version();
    mix.webpackConfig({
        resolve: {
            alias: {
                'vue-router$': 'vue-router/dist/vue-router.common.js'
            }
        },
        // output: {
        //     publicPath: '/',
        //     filename: '[name].[chunkhash:10].js',
        //     chunkFilename : '[name].[chunkhash:10].js'
        // }
    });
}
mix.disableNotifications();
mix.options({
    processCssUrls: false
});

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

// mix.js('resources/js/vue.js', 'public/js/lib/vue.chunk.js');
// mix.js('resources/js/chunk-jquery.js', 'public/js/lib');

//h5
mix.js('resources/h5/index/index.js', 'public/js/h5/index');
mix.js('resources/h5/catlog/index.js', 'public/js/h5/catlog');
mix.js('resources/h5/cart/index.js', 'public/js/h5/cart');
mix.js('resources/h5/item/detail.js', 'public/js/h5/item');
mix.js('resources/h5/item/search.js', 'public/js/h5/item');
mix.js('resources/h5/user/index.js', 'public/js/h5/user');
mix.js('resources/h5/order/index.js', 'public/js/h5/order');
mix.js('resources/h5/order/detail.js', 'public/js/h5/order');
mix.js('resources/h5/order/buynow.js', 'public/js/h5/order');
mix.js('resources/h5/order/confirm.js', 'public/js/h5/order');
mix.js('resources/h5/order/rate.js', 'public/js/h5/order');
mix.js('resources/h5/sold/detail.js', 'public/js/h5/sold');
mix.js('resources/h5/address/index.js', 'public/js/h5/address');
mix.js('resources/h5/security/index.js', 'public/js/h5/security');
mix.js('resources/h5/feedback/index.js', 'public/js/h5/feedback');
mix.js('resources/h5/refund/apply.js', 'public/js/h5/refund');
mix.js('resources/h5/live/index.js', 'public/js/h5/live');
mix.js('resources/h5/live/detail.js', 'public/js/h5/live');


//后台
mix.js('resources/pages/admin/app.js', 'public/js/admin');
//会员中心
mix.js('resources/pages/user/app.js', 'public/js/user');
//订单
// mix.js('resources/pages/order/buynow.js', 'public/js/order');
// mix.js('resources/pages/order/confirm.js', 'public/js/order');
// mix.js('resources/pages/cart/app.js', 'public/js/cart');
//sass
// mix.sass('resources/sass/bootstrap.scss', 'public/css/vendor');
// mix.sass('resources/sass/element-ui.scss', 'public/css/vendor');
mix.sass('resources/sass/index/index.scss', 'public/css/index');
mix.sass('resources/sass/admin/index.scss', 'public/css/admin');
// mix.sass('resources/sass/admin/login.scss', 'public/css/admin');
mix.sass('resources/sass/h5/index.scss', 'public/css/h5');
// mix.sass('resources/sass/errors/index.scss', 'public/css/errors');
// mix.sass('resources/sass/auth/index.scss', 'public/css/auth');
mix.sass('resources/sass/user/index.scss', 'public/css/user');
mix.sass('resources/sass/order/index.scss', 'public/css/order');
mix.sass('resources/sass/cart/index.scss', 'public/css/cart');
//less
// mix.less('resources/sass/vant.less', 'public/css/vendor');

